package cn.novel.bm.domain.novel;

import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Type;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import java.util.Date;
import java.util.UUID;

@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "小说章节")
public class Chapter {

    @Id
    @Type(type = "org.hibernate.type.PostgresUUIDType")
    private UUID chapterId;
    private Integer chapterNo;
    private String chapterTitle;
    private Integer wordsCount;
    private Integer flag;

    private Date createAt;
    private Date updateAt;

    private UUID outSourceId;
    @ManyToOne
    private Novel novel;

}
